package com.ressource;

import com.ressource.LocaleManager;

/**
 * This class signals that the {@link ProcessLauncher} class failed to launch a
 * command. In most of the case, it happens when the command doesn't exist.
 */
public class ProcessLauncherException extends Exception
{
	/**
	 * 
	 */
	private static final long	serialVersionUID	= 1L;

	/**
	 * The command that caused the exception.
	 */
	private String				command;

	/**
	 * Constructs a new exception from the command that caused it.
	 * 
	 * @param command the command that caused the exception
	 */
	public ProcessLauncherException(String command)
	{
		/* Sets the exception message */
		super(LocaleManager.getLocalizedString("UnableLaunchCommandString",
				command));

		this.command = command;
	}

	/**
	 * Returns the command that caused the exception.
	 * 
	 * @return the command that caused the exception
	 */
	public String getCommand()
	{
		return command;
	}
}
